package com.core.base;

public class PageRequest {
    private int index;
    private int pageSize = PageResult.DEFAULT_PAGE_SIZE;

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        if (index < 0) {
            throw new IllegalArgumentException("index must be positive");
        }
        this.index = index;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        if (index < 0) {
            throw new IllegalArgumentException("index must be positive");
        }
        this.pageSize = pageSize;
    }
}
